package com.jhy.ws.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@AllArgsConstructor
@Getter
public enum IsReadEnum {

    UN_READ(0),
    READ(1),
    ;

    private final Integer value;

    public static IsReadEnum getValue(Integer value) {
        return Arrays.stream(IsReadEnum.values()).filter(r -> r.value.equals(value)).findFirst().orElseThrow(() -> new RuntimeException("读取标识未找到"));
    }
}
